Skip to content

Conversation

@tslight
Copy link

@tslight tslight commented Jan 31, 2026

I recently acquired 3 old Macbooks (MBP 8,3, MBA 6,1, MBA 7,2) and the Fn, Eject & Multimedia keys did not show up in the output of kbdscan, evtest or xev or do anything but provide F1..F12 whether Fn was held or not.

This PR fixes that and adds sysctls for toggling whether or not holding Fn is required to access the Multimedia keys.

I'm curious why we're looking for the Apple vendor usage page at 0xFFFF rather than the locations Linux looks for it? I found it at 0x00FF on all 3 machines. I've left 0xFFFF in there as I'm assuming it was set to that for a good reason and works on Apple hardware that Linux no longer supports.

I've also added a sysctl for ukbd & hkbd to toggle the mode of the function keys similar to what's available on Linux, but would like to make a more convenient toggle via Fn+Esc at some point...

Finally, one of the main motivations for this work was to get extra keys to bind to my desires in userland which is why I've "unhidden" the Fn and Eject keys. I chose KEY_WAKEUP for Fn, as KEY_FN doesn't make it to X, and XF86WakeUp commonly shows up on the Fn key back in penguin land...

@github-actions
Copy link

github-actions bot commented Feb 1, 2026

Thank you for taking the time to contribute to FreeBSD!

All issues resolved.

@tslight tslight changed the title Fix handling of Apple FN/Multimedia keys in hid and evdev ukbd, hkbd, evdev: fix apple fn key handling Feb 1, 2026
@tslight tslight changed the title ukbd, hkbd, evdev: fix apple fn key handling ukbd, hkbd, evdev: fix apple "magic" keys Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant